myApp.factory('$serItem',function ($resource,URL,$rootScope) {
    var setSend = function(data, url){
        data = data || {};
        url = URL + url;
        return $resource(url)
            .save(data)
            .$promise;
    };
    return {
        info: function(data){
            return setSend(data,'Item/getItemInfo');
        },
        comment: function(data){
            return setSend(data,'Comment/getItemCommentList');
        },
        descrip: function(data){
            return setSend(data,'Item/getDescrip');
        },
        /*结算接口/立即购买*/
        buy: function(data){
            return setSend(data,'Order/perOrder');
        }
    }
});